<template>
  <div id="index">
    <!-- ref="appRef" -->
    <dv-full-screen-container class="full_body">
      <div class="bg  ">
        <!-- <dv-loading v-if="loading">Loading...</dv-loading>
        <div v-else class="host-body dl_flex " style="height: 100%;">
         
        </div> -->
        <div class=" bg_new top_shadow dl_flex ">
          <div class="body_left">
            <DemoLeft></DemoLeft>
          </div>
          <div class="body_center">
            <div class="center_top"></div>
            <DemoCenter></DemoCenter>
          </div>
          <div class="body_right">
            <DemoRight></DemoRight>
          </div>
        </div>
      </div>
    </dv-full-screen-container>
  </div>
</template>

<script>
import drawMixin from "../utils/drawMixin";
import { formatTime } from "../utils/index.js";
import DemoLeft from "./demoLeft.vue";
import DemoRight from "./demoRight.vue";
import DemoCenter from "./demoCenter.vue";
// import EchartsDemo from "../components/echart/echarts/echartsDemo.vue";

export default {
  mixins: [drawMixin],
  data() {
    return {
      timing: null,
      loading: true,
      dateDay: null,
      dateYear: null,
      dateWeek: null,
      weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
    };
  },
  components: {
    DemoLeft,
    DemoRight,
    DemoCenter,
    // EchartsDemo,
  },
  mounted() {
    this.timeFn();
    this.cancelLoading();
  },
  beforeDestroy() {
    clearInterval(this.timing);
  },
  methods: {
    timeFn() {
      this.timing = setInterval(() => {
        this.dateDay = formatTime(new Date(), "HH: mm: ss");
        this.dateYear = formatTime(new Date(), "yyyy-MM-dd");
        this.dateWeek = this.weekday[new Date().getDay()];
      }, 1000);
    },
    cancelLoading() {
      setTimeout(() => {
        this.loading = false;
      }, 500);
    },
  },
};
</script>

<style lang="scss">
@import "../assets/scss/index.scss";
</style>
<style scoped>
body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}
.full_body {
  width: 100%;
  height: 100%;
  background: #c84026;
}
.bg_new {
  background: #b70406;
}
.body_left {
  width: 25%;
  height: 100%;
  z-index: 10;
  transform: rotate(0deg);
  opacity: 1;
  pointer-events: none;
  border: 5px blue;
}
.body_right {
  width: 25%;
  height: 100%;
  z-index: 10;
  transform: rotate(0deg);
  opacity: 1;
  pointer-events: none;
  border: 5px blue;
}
.body_center {
  width: 50%;
  height: 100%;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.center_top {
  width: 100%;
  height: 100%;
  pointer-events: auto;
  image-rendering: -webkit-optimize-contrast;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-image: url(//datav.oss-cn-hangzhou.aliyuncs.com/uploads/images/e235ea8ac34226f3e2f70a917628ee93.png);
  -webkit-mask-image: none;
  -webkit-mask-repeat: initial;
  -webkit-mask-size: initial;
  background-color: initial;
  border-radius: 0px;
  cursor: pointer;
  position: relative;
  top: -35px;
}
.top_shadow {
  height: 100%;
  box-shadow: 0px -5px 5px #f5d297;
}
</style>
